Optimal. Leaf size=38 \[ \frac {a x}{2}+\frac {a \sin (c+d x)}{d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2715, 8,
2717} \begin {gather*} \frac {a \sin (c+d x)}{d}+\frac {a \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 3872
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+a \sec (c+d x)) \, dx &=a \int \cos (c+d x) \, dx+a \int \cos ^2(c+d x) \, dx\\ &=\frac {a \sin (c+d x)}{d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} a \int 1 \, dx\\ &=\frac {a x}{2}+\frac {a \sin (c+d x)}{d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 32, normalized size = 0.84 \begin {gather*} \frac {a (2 (c+d x)+4 \sin (c+d x)+\sin (2 (c+d x)))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 38, normalized size = 1.00
method | result | size |
risch | \(\frac {a x}{2}+\frac {a \sin \left (d x +c \right )}{d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(32\) |
derivativedivides | \(\frac {a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a \sin \left (d x +c \right )}{d}\) | \(38\) |
default | \(\frac {a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a \sin \left (d x +c \right )}{d}\) | \(38\) |
norman | \(\frac {\frac {a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {a x}{2}+\frac {3 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(82\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 34, normalized size = 0.89 \begin {gather*} \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a + 4 \, a \sin \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.09, size = 29, normalized size = 0.76 \begin {gather*} \frac {a d x + {\left (a \cos \left (d x + c\right ) + 2 \, a\right )} \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos ^{2}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 56, normalized size = 1.47 \begin {gather*} \frac {{\left (d x + c\right )} a + \frac {2 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.06, size = 50, normalized size = 1.32 \begin {gather*} \frac {a\,x}{2}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________